package com.financing.platform.service;

import java.sql.SQLException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.financing.platform.dto.ManagerOrderDTO;
import com.financing.platform.dto.ManagerOrderHistoryDTO;
import com.financing.platform.dto.UserInfoDTO;
import com.financing.platform.vo.ManagerOrderVO;
import com.financing.platform.vo.OrderVO;

public interface IManagerOrderService extends IBaseService {

	/**
	 * 给订单管理员分配订单
	 * 
	 * @param managerOrder
	 * @return
	 * @throws SQLException
	 */
	public int addManagerOrderUser(ManagerOrderDTO managerOrder, String orderIds, String projectType) throws SQLException;

	/**
	 * 给订单管理员分配订单历史
	 * 
	 * @param managerOrderHistory
	 * @return
	 * @throws SQLException
	 */
	public int addManagerOrderUserHistory(ManagerOrderHistoryDTO managerOrderHistory) throws SQLException;

	/**
	 * 订单权限表修改
	 * 
	 * @param managerOrder
	 * @return
	 * @throws SQLException
	 */
	public int updateManagerOrderUser(ManagerOrderDTO managerOrder, String orderIds, String ptype) throws SQLException;

	/**
	 * 根据订单ID查询
	 * 
	 * @param orderIds
	 * @return
	 * @throws SQLException
	 */
	public List<ManagerOrderVO> queryManagerOrderByOrderIds(String orderIds) throws SQLException;
	
	/**
	 * 回收某订单管理员的所有订单
	 * @param systemUserId
	 * @param ptype
	 * @return
	 * @throws SQLException
	 */
	public int editManagerOrderByUser(String systemUserId, UserInfoDTO user) throws SQLException;
	
	/**
	 * 根据理财师查询订单人员
	 * @param systemUserid
	 * @return
	 * @throws SQLException
	 */
	public List<HashMap<String, Object>> queryFaUserBySystemUser(Map<String,String> faids) throws SQLException;
	
	/**
	 * 查询当前用户人员被分配的订单总数
	 * @param managerOrder
	 * @return
	 */
	public int countOrdersBySUid(ManagerOrderDTO managerOrder)throws SQLException;
	
	/**
	 * 当前用户人员被分配的所有的订单
	 * @param managerOrder
	 * @return
	 * @throws SQLException 
	 */
	public List<OrderVO> queryOrdersBySUid(ManagerOrderDTO managerOrder) throws SQLException;

	public void order2Leader(Map<String, Object> toLeaderMap) throws SQLException;
}
